<?xml version='1.0' encoding='ISO-8859-1' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"   
      xmlns:jb="http://java.sun.com/jsf/composite/componentes"
      xmlns:p="http://primefaces.org/ui">

    <SCRIPT language="JavaScript" type="text/javascript">
                   
        function handleRequest(xhr, status, args) {                     
            if(args.validationFailed || !args.CallbackParam) {  
     
            } else {                              
                carDialogDeta.hide();  
                jQuery('#btnGuardarDetalle').fadeOut();  
            }  
        }  
    </SCRIPT>
    <h:form onsubmit="return checkSubmit();"  id="frmDetalle">
        <h:panelGrid id="pgFormDtoDeta"   frame="box">
            <h:panelGrid  columns="4" cellpadding="4">
                
                <h:outputLabel for="itAnio" styleClass="label" value="#{i18n['form.afp.año']}"/>                
                <p:spinner id="itAnio" label="#{i18n['form.periodo.anio']}" value="#{afpMBean.detaDto.anio}" min="2013" max="3000" size="5" styleClass="txtCampoObligatorio" 
                                           onkeypress="return fn_validaTecla('entero',this)" required="true" disabled="false"/>
                
                <h:outputLabel for="itMeses" styleClass="label" value="#{i18n['form.afp.mes']}"/>
                <p:selectOneMenu id="itMeses" value="#{afpMBean.detaDto.mes}" disabled="#{sessionMBean.accionDetalle == applicationMBean.ver}"                                  
                                 style="#{applicationMBean.estiloObligatorio}">
                    <f:selectItems value="#{afpMBean.listaMeses}"/>                        
                </p:selectOneMenu>
                
                <h:outputLabel for="itFactorMora" value="#{i18n['form.afp.factor.mora']}" styleClass="label"/>
                <p:inputText id="itFactorMora" label="#{i18n['form.afp.factor.mora']}" style="#{applicationMBean.estiloObligatorio}"
                             value="#{afpMBean.detaDto.factorMora}"  readonly="#{sessionMBean.accionDetalle == applicationMBean.ver}"
                             onkeypress="return fn_validaTecla('decimal',this)"
                             required="true" size="10">
                    <f:validateLength minimum="1" maximum="9"/>
                    <f:convertNumber pattern="#{applicationMBean.formatoMontos}"/>
                </p:inputText>
                
                <h:outputLabel value="#{i18n['form.afp.fecha.pago']}" styleClass="label"/>
                <p:calendar value="#{afpMBean.detaDto.fechaPago}" pattern="#{applicationMBean.formatoFecha}" style="#{applicationMBean.estilo}" size="10"
                            disabled="#{sessionMBean.accionDetalle == applicationMBean.ver}"/>
                
                <h:outputLabel for="itPorcentFondo" value="#{i18n['form.afp.porcentaje.fondo']}" styleClass="label"/>
                <p:inputText id="itPorcentFondo" label="#{i18n['form.afp.porcentaje.fondo']}" style="#{applicationMBean.estiloObligatorio}"
                             value="#{afpMBean.detaDto.porcentajeFondo}"  readonly="#{sessionMBean.accionDetalle == applicationMBean.ver}"
                             onkeypress="return fn_validaTecla('decimal',this)"
                             required="true" size="10">
                    <f:validateLength minimum="1" maximum="9"/>
                    <f:convertNumber pattern="#{applicationMBean.formatoMontos}"/>
                </p:inputText>
                
                <h:outputLabel for="itPorcentSeg" value="#{i18n['form.afp.porcentaje.seguro']}" styleClass="label"/>
                <p:inputText id="itPorcentSeg" label="#{i18n['form.afp.porcentaje.seguro']}" style="#{applicationMBean.estiloObligatorio}"
                             value="#{afpMBean.detaDto.porcentajeSeguro}"  readonly="#{sessionMBean.accionDetalle == applicationMBean.ver}"
                             onkeypress="return fn_validaTecla('decimal',this)"
                             required="true" size="10">
                    <f:validateLength minimum="1" maximum="9"/>
                    <f:convertNumber pattern="#{applicationMBean.formatoMontos}"/>
                </p:inputText>                                                
                
            </h:panelGrid>
                
            <h:panelGrid columns="1" cellpadding="4">
                
                <p:fieldset legend="#{i18n['form.afp.tipo.comision.mixta']}" styleClass="label">
                    <h:panelGrid id="pgPorcentajeComision" columns="4" cellpadding="4">
                    
                        <h:outputLabel for="itComFlujo" value="#{i18n['form.afp.comision.mixta']}" styleClass="label"/>
                        <p:inputText id="itComFlujo" label="#{i18n['form.afp.comision.mixta']}" style="#{applicationMBean.estiloObligatorio}"
                                     value="#{afpMBean.detaDto.comisionMixta}"  readonly="#{sessionMBean.accionDetalle == applicationMBean.ver}"
                                     onkeypress="return fn_validaTecla('decimal',this)"
                                     required="true" size="10">
                            <f:validateLength minimum="1" maximum="9"/>
                            <f:convertNumber pattern="#{applicationMBean.formatoMontos}"/>
                        </p:inputText>

                        <h:outputLabel for="itComSaldo" value="#{i18n['form.afp.comision.saldo']}" styleClass="label"/>
                        <p:inputText id="itComSaldo" label="#{i18n['form.afp.comision.saldo']}" style="#{applicationMBean.estiloObligatorio}"
                                     value="#{afpMBean.detaDto.comisionSaldo}"  readonly="#{sessionMBean.accionDetalle == applicationMBean.ver}"
                                     onkeypress="return fn_validaTecla('decimal',this)"
                                     required="true" size="10">
                            <f:validateLength minimum="1" maximum="9"/>
                            <f:convertNumber pattern="#{applicationMBean.formatoMontos}"/>
                        </p:inputText>

                    </h:panelGrid>
                </p:fieldset>
                
                <p:fieldset legend="#{i18n['form.afp.tipo.comision.flujo']}" styleClass="label">
                    <h:panelGrid columns="10" cellpadding="4">
                        <h:outputLabel for="itComFlujo2" value="#{i18n['form.afp.comision.flujo']}" styleClass="label"/>
                        <p:inputText id="itComFlujo2" label="#{i18n['form.afp.comision.flujo']}" style="#{applicationMBean.estiloObligatorio}"
                                     value="#{afpMBean.detaDto.comisionFlujo}"  readonly="#{sessionMBean.accionDetalle == applicationMBean.ver}"
                                     onkeypress="return fn_validaTecla('decimal',this)"
                                     required="true" size="10">
                            <f:validateLength minimum="1" maximum="9"/>
                            <f:convertNumber pattern="#{applicationMBean.formatoMontos}"/>
                        </p:inputText>
                    </h:panelGrid>
                </p:fieldset>
                
            </h:panelGrid>
        
        <p:panel id="pnlAcciones">
            <h:panelGrid columns="10">
                <p:commandButton id="btnGuardarDetalle" update=":msjDialogDeta,:frmPrincipal:tabPrincipal,:msgs" 
                                 title="#{i18n['general.button.guardar.tip']}"
                                 style="#{applicationMBean.estilosBtnGuardar}"
                                 ajax="true"                                 
                                 icon="ui-icon ui-icon-disk" rendered="#{sessionMBean.accionDetalle != applicationMBean.ver}"
                                 value="#{i18n['general.button.guardar']}" 
                                 action="#{afpMBean.guardarDetalles}"
                                 oncomplete="handleRequest(xhr, status, args);"
                                 >
                </p:commandButton>
            </h:panelGrid>
        </p:panel>
        </h:panelGrid>  
    </h:form>
</html>